package com.wyz.audio.network;

import com.wyz.socket.core.Common;

/**
 * 基础返回信息Model
 */
public class ConnectorInfo {
    private final String key;
    private final String value;

    ConnectorInfo(String msg) {
        String[] strings = msg.split(Common.PARAMETER);
        key = strings[0];
        if (strings.length == 2) {
            value = strings[1];
        } else {
            value = null;
        }
    }

    public String getKey() {
        return key;
    }

    public String getValue() {
        return value;
    }

    @Override
    public String toString() {
        return "ConnectorInfo{" +
                "key='" + key + '\'' +
                ", value='" + (value == null ? "null" : value) + '\'' +
                '}';
    }
}
